<?php
namespace app\api\controller;

use app\BaseController;

class Sms extends BaseController{
    public function code():object{
        #1.接收手机号
        $phoneNumber = input('parma.phone_number','');
        #2.验证
        try{

        }catch(\think\exception\ValidateException $e){
            return show(config('status.error'),$e->getError());
        }
        #3.调用business
        if(SmsBus::sendCode($phoneNumber)){
            return show(config("status.success"), "OK");
        }

        return show(config("status.success"), "OK");
    }
}